package org.example.greenhouse.entity;

import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.persistence.Transient;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.annotation.CreatedDate;

import java.util.Date;

@Entity
@Table(name = "greenhouse")
@Data
@DynamicUpdate
public class GreenHouse {
    @Id
    private Long houseId;
    private String houseName;
    private String address;
    private Double area;

    @CreatedDate
    private Date createdTime;

    @Transient
    private int deviceCount;

}
